<template>
  <van-search
    class="search-box"
    v-model="value"
    shape="round"
    placeholder="请输入搜索关键词"
    :show-action="true"
    @click="gosearch"
  >
    <template #left>
      <div class="city">西安</div>
    </template>
    <template #action>
      <div>登录</div>
    </template>
  </van-search>
</template>

<script>
export default {
  name: "Search",
  data() {
    return {
      value: "",
    };
  },
  // 跳转到搜索商品
  methods:{
    gosearch(){
      this.$router.push("/SearchPro")
    }
  }
};
</script>

<style scoped>
@import url(../assets/iconfonts/iconfont.css);
.search-box {
  width: 100%;
  height: 3.75rem;
  display: flex;
  justify-content: space-around;
  background: linear-gradient(to right, red, orange);
  align-items: center;
  color: white;
}
.city{
  font-size: 14px;
 
}
</style>
